<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/comm :: head "></head>
<body>
<div class="wrapper">
    <header th:replace="common/comm :: header "></header>
    <div class="main-panel">
        <div class="content">
            <div class="container-fluid">
                <h4 class="page-title">
                    <font id="WOW_TRANSLATE_43" class="WOW_TRANSLATE_STYLE"
                          data--w-o-w_-i-n-d-e-x="43">培训管理 >> 培训反馈</font>
                </h4>
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-body">
                                <form th:action="@{/sys/train/feedback}" th:method="post"
                                      enctype="multipart/form-data">
                                    <input type="hidden" name="id" th:value="${train.id}">
                                    <div class="form-group">
                                        <label for="code"><font>培训名称:&nbsp;&nbsp; </font></label>
                                        <span id="title" name="title" th:text="${train.title}"/>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="code"><font> 培训讲师:&nbsp;&nbsp; </font></label>
                                        <span type="text" id="lecturer" name="lecturer" th:text="${train.lecturer}"/>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="code"><font> 培训日期:&nbsp;&nbsp; </font></label>
                                        <span id="startDate" name="startDate"
                                              th:text="${train.startDate}"/>
                                        <label for="code"><font> 至:&nbsp;&nbsp; </font></label>
                                        <span id="endDate" name="endDate" th:text="${train.endDate}"/>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="testrange"> 培训目的:&nbsp;&nbsp; </label>
                                        <span name="goal" th:text="${train.goal}"></span>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="testrange"> 参训人员:&nbsp;&nbsp; </label>
                                        <span name="personnel" th:text="${train.personnel}"></span>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="testrange"> 培训简介:&nbsp;&nbsp; </label>
                                        <span name="intro" th:text="${train.intro}"></span>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <div id="trainShow">
                                            <label for="code"><font> 培训资料:&nbsp;&nbsp; </font></label>
                                            <a href="javascript:;" th:onclick="|downloadFile(${train.id})|"
                                               th:text="${train.fileName}"></a>&nbsp;&nbsp;
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label for="testrange"> 审核意见:&nbsp;&nbsp; </label>
                                        <span name="auditOpinion" th:text="${train.auditOpinion}"></span>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group" style="text-align: center;">
                                        <span>培训反馈</span>
                                        <small class="form-text text-muted"></small>
                                    </div>

                                    <hr>
                                    <div class="kv-item ue-clear">
                                        <label>培训反馈:</label>
                                        <div class="kv-item-content">
                                            <select name="feedbackRank" class="form-control" id="feedbackRank">
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="testrange"> 培训总结:&nbsp;&nbsp; </label>
                                        <textarea class="form-control" rows="5" cols="105" name="summary" ></textarea>
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <div class="form-group">
                                        <label for="testrange"> 考核结果:&nbsp;&nbsp; </label>
                                        <textarea class="form-control" rows="5" cols="105" name="result" ></textarea>
                                        <small class="form-text text-muted"></small>
                                    </div>

                                    <div class="form-group" style="text-align: center;">
                                        <input type="submit" class="btn btn-success" value="保存">
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <input type="button" th:onclick="'javascript:history.go(-1);'" class="btn btn-danger"  value="返回" >
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <footer th:replace="common/comm :: footer "></footer>
</div>

</body>
<script th:inline="javascript">
    jQuery(function ($) {

        var feedbackRank = $("#feedbackRank");
        $.ajax({
            type: "GET",
            url: "/sys/train/feedbackRank",
            dataType: "json",
            success: function (data) {
                if (data != null) {
                    feedbackRank.html("");
                    var options = "<option value=\"0\">请选择</option>";
                    for (var i = 0; i < data.length; i++) {
                        options += "<option value=\"" + data[i].id + "\" >" + data[i].valueName + "</option>";
                    }
                    feedbackRank.html(options);
                }
            },
            error: function (data) {
                alert("异常!");
            }
        });

    });
</script>
</html>


